using System;

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Updating;
using DevExpress.Xpo;
using DevExpress.Data.Filtering;

namespace AppSCM.Module.Win
{
    public class Updater : ModuleUpdater
    {
        public Updater(ObjectSpace objectSpace, Version currentDBVersion) : base(objectSpace, currentDBVersion) { }
        public override void UpdateDatabaseAfterUpdateSchema()
        {
            base.UpdateDatabaseAfterUpdateSchema();
            string fullname=typeof(NavImage_1).FullName;
            NavImageObject obj=ObjectSpace.FindObject<NavImageObject>(new BinaryOperator("EditorObjectType",fullname));
            if (obj == null)
            {
                obj = new NavImageObject(ObjectSpace.Session);
                obj.EditorObjectType = fullname;
                obj.Save();
            }
        }
    }
}
